package edu.cmu.cs214.hw9.facelook;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.DateFormat;
import java.text.Format;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

import edu.cmu.cs214.hw9.db.Constants;
import edu.cmu.cs214.hw9.json.JSONException;
import edu.cmu.cs214.hw9.json.JSONObject;

public class Test {

	/**
	 * @param args
	 * @throws JSONException 
	 * @throws ParseException 
	 * @throws SQLException 
	 * @throws ClassNotFoundException 
	 */
	public static void main(String[] args) throws JSONException, ParseException, SQLException, ClassNotFoundException {
		Class.forName(Constants.JDBC_NAME);
		Connection conn = DriverManager.getConnection("jdbc:sqlite:facelook0.db");
		Statement stat = conn.createStatement();
		
		//Check to see if users table already exists.  If so, drop it, because we
		//are resetting the database everytime the server restarts.
		
		//^^ We don't have to do that^^
		DatabaseMetaData meta = conn.getMetaData();
		ResultSet rs = meta.getTables(null, null, "users", null);
		if (rs.next())
			System.out.println("yup");		
		
		
	}

}
